package com.ruoyi.toobit.task;

import com.ruoyi.spot.openapi.lastesttrade.controller.SpotOpenapiLastestTradationController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 现货最近成交监控任务：调用 /quote/v1/trades 并校验、落库与告警。
 * 调用目标：spotLastestTradeMonitorTask.execute()
 */
@Component("spotLastestTradeMonitorTask")
public class SpotLastestTradeMonitorTask {

    private static final Logger logger = LoggerFactory.getLogger("sys-info");

    @Autowired
    private SpotOpenapiLastestTradationController lastestTradationController;

    public void execute() {
        logger.info("⏰ [SpotLastestTradeMonitorTask] 开始最近成交监控...");
        lastestTradationController.SpotOpenapiLastestTradation();
        logger.info("✅ [SpotLastestTradeMonitorTask] 完成最近成交监控");
    }
}


